package com.hsc.db.tools;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class DBOpenHelper extends SQLiteOpenHelper {

	public DBOpenHelper(Context context) {
		super(context, "hsc.db", null, 1);

	}

	@Override
	public void onCreate(SQLiteDatabase db) {

		db.execSQL("create table acclist(id integer primary key autoincrement,date varchar(20),time varchar(20) NULL,type varchar(20),remark varchar(100) NULL,balance double,amt double,use varchar(20) )");
		db.execSQL("create table item(id integer primary key autoincrement,type varchar(20) null,flag varchar(10) null)");

		//db.execSQL("ALTER TABLE acclist ADD COLUMN use varchar(20)");
		db.execSQL("create table useitem(id integer primary key autoincrement,usetype varchar(20) null,flag varchar(10) null)");
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

	}

}
